﻿<!-- #include virtual="/Inc/conn.asp"-->
<!-- #include virtual="/Inc/md5.asp"-->
<!-- #include virtual="/Inc/function.asp"-->
<!-- #include virtual="/Inc/config.asp"-->
<!-- #include virtual="/Inc/Admin/common.asp"-->
<%
Dim vid,num,words,vtitle
vid=clng(Trim(Request("vid")))
		if vid="" then Response.write "<script language=javascript>alert('错误的编号')</script>"
		set conn=Server.CreateObject("ADODB.Connection")
		conn.open ConnStr
		set rs=conn.execute("select title from db_vote Where ID="&vid)
		if rs.eof then Response.write "<script language=javascript>alert('错误的编号')</script>"
		vtitle=rs(0)
		rs.close
		rs.open "select itemName,Amount from db_voteitem where ID="&vid,conn,1,1
		strTotal=rs.GetRows
		rs.close
		Set rs=nothing
		conn.close
		Set conn=nothing
	
		total=0
	
		for i=0 to Ubound(strTotal,2)
			total=total+strTotal(1,i)
		next
%>
<table width="100%" border="0" cellspacing="1" cellpadding="5">
<tr>
<td bgcolor="#f3f7fa"><b>调查项目</b></td>
</tr>
<tr>
<td><%=vtitle%>(<%=total%>)</td>
</tr>
<tr>
<td><table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#d2dfe6">
<%
for i=0 TO Ubound(strTotal,2)
%>
<tr>
<td bgcolor="#FFFFFF"><%=strTotal(0,i)%></td>
<td bgcolor="#FFFFFF"><img border="0" src="/images/poll.gif" width="<%=Int(85*strTotal(1,i)/(total+0.0001)+0.5)%>%" height="10"> <%=Int(100*strTotal(1,i)/(total+0.0001)+0.5)%>%</td>
<td bgcolor="#FFFFFF"><%=strTotal(1,i)%></td>
</tr>
<%
next
%>    
</table></td>
</tr>
</table>